#!/bin/bash
#SBATCH -t 0-120:00
#SBATCH -n 150
#SBATCH -N 150
#SBATCH -p shared
#SBATCH -e errorfile.002
#SBATCH -o errorfile.002
#SBATCH --mem-per-cpu=20000 #Memory per cpu
iexpnr=002

workdir=`pwd`
rm -rf tmpdir.$iexpnr
mkdir tmpdir.$iexpnr

ulimit -s unlimited
cp dales4 *inp.$iexpnr namoptions.$iexpnr tmpdir.$iexpnr/
cd tmpdir.$iexpnr
srun ./dales4 namoptions.$iexpnr >output.$iexpnr

mkdir ${workdir}/R${iexpnr}
mv * ${workdir}/R${iexpnr}
cd $workdir
rm -r tmpdir.$iexpnr
